package ipad.asia.service.impl;

import ipad.asia.dao.EnterpriseDao;
import ipad.asia.entity.Enterprise;
import ipad.asia.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EnterpriseServiceImpl implements EnterpriseService {
    @Autowired
    private EnterpriseDao enterpriseDao;
    @Override
    public Enterprise findByUserAndPassword(String user, String password) {
        return enterpriseDao.findByUserAndPassword(user, password);
    }

    @Override
    public void save(Enterprise enterprise) {
         enterpriseDao.save(enterprise);
    }

    @Override
    public Enterprise findByUser(String user) {
        return enterpriseDao.findByUser(user);
    }

    @Override
    public Enterprise findById(int id) {
        return enterpriseDao.findById(id);
    }
}
